package mil.af.amc.adpetracker.web.decorators;

import org.displaytag.decorator.TableDecorator;
import mil.af.amc.adpetracker.model.Organization;

/**
 * Please Fill in this Javadoc
 *
 * @author TSgt Jason Ferguson
 */

public class OrganizationDecorator extends TableDecorator {

    public String getOrganizationName() {

        Organization org = (Organization) getCurrentRowObject();
        return org.getName();
    }

    public String getOrganizationParentName() {

        Organization org = (Organization) getCurrentRowObject();
        return org.getParent().getName();
    }

    public int getChildCount() {

        Organization org = (Organization) getCurrentRowObject();
        return org.getChildren().size();
    }

    public String getActions() {
         return "Add Child";
    }
}
